import csv

Message = []


with open("院士统计表.csv", mode="a", encoding="utf-8") as f:
    headers = ["姓名", "所属部门", "学术称号", "专业领域", "出生年月", "出生地", "当选年份", "照片url"]  # 定义表头
    writer = csv.DictWriter(f, headers)

    writer.writeheader()  # 将表头写入
    writer.writerows(Message)